package com.ruoyi.mould.controller;

import com.ruoyi.mould.service.IJacMouldLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.mould.domain.JacMouldLog;

/**
 * 【请填写功能名称】 提供者
 *
 * @author ruoyi
 * @date 2021-02-18
 */
@RestController
@RequestMapping("log")
public class JacMouldLogController extends BaseController
{

	@Autowired
	private IJacMouldLogService jacMouldLogService;

	/**
	 * 查询${tableComment}
	 */
	@GetMapping("get/{id}")
	public JacMouldLog get(@PathVariable("id") Long id)
	{
		return jacMouldLogService.selectJacMouldLogById(id);

	}

	/**
	 * 查询【请填写功能名称】列表
	 */
	@GetMapping("list")
	public R list(JacMouldLog jacMouldLog)
	{
		startPage();
        return result(jacMouldLogService.selectJacMouldLogList(jacMouldLog));
	}


	/**
	 * 新增保存【请填写功能名称】
	 */
	@PostMapping("save")
	public R addSave(@RequestBody JacMouldLog jacMouldLog)
	{
		return toAjax(jacMouldLogService.insertJacMouldLog(jacMouldLog));
	}

	/**
	 * 修改保存【请填写功能名称】
	 */
	@PostMapping("update")
	public R editSave(@RequestBody JacMouldLog jacMouldLog)
	{
		return toAjax(jacMouldLogService.updateJacMouldLog(jacMouldLog));
	}

	/**
	 * 删除${tableComment}
	 */
	@PostMapping("remove")
	public R remove(String ids)
	{
		return toAjax(jacMouldLogService.deleteJacMouldLogByIds(ids));
	}



}
